import Http from "../http";

export async function getRulesApi(menuId:number) {
    return await Http.get<any[]>('system/rules/' + menuId)
}

export async function addRuleApi(data:any) {
    return await Http.post('system/rule/add', data)
}

export async function editRuleApi(id:number, data:any) {
    return await Http.put('system/rule/edit/' + id, data)
}

export async function deleteRuleApi(ids:number[]) {
    return await Http.delete('system/rule/delete', {ids})
}